<?php
session_start();
?>


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../docs-assets/ico/favicon.png">

    <title>Starter Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- Custom styles for this template -->
   

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    
        <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>

      <!--
               <script type="text/javascript">

$(function(){
		 
    $("#loginform").submit(function(e){
       e.preventDefault();
 
       
			dataString= $('#loginform').serialize();
			$.ajax({
			
			type: "POST",
			url: "checklogindetail.php",
			data: dataString,
				success: function(response){
					
				 $('.login').hide();
				
				  $('.maindiv').html(response);
				 
		}
		});
		 }); });
</script>-->
 
    
  </head>

  <body>
 
  <?php 
  
  if(!isset($_SESSION['username']) || !isset($_SESSION['password']))
{
?>
<div class='navbar navbar-inverse navbar-fixed-top maindiv' role='navigation'>
<div class="container">
<div class='navbar-header'>
          
          <a class='navbar-brand' href='index.php'>Addmin Panel</a>
        </div></div></div>
   <div class="container login" style="margin-top: 130px;
margin-left: 200px;">
   <div><?php if(isset($_GET['error']))
 { echo "<span style='color:red;'>user name and password are not match</span>";}?>
  <div><h3>Addmin Login</h3></div>
  
<form class="form-horizontal" role="form" id="loginform" action="checklogindetail.php"  method="post" >

      	<div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label"  >User Name</label>
            <div class="col-sm-6">
              <input type="text" class="form-control" placeholder="Username" name="username" required  value="<?php if(isset($_COOKIE["rememberusername"])){ echo $_COOKIE["rememberusername"]; }?>" >
            </div>
            </div>
            	<div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label"  >Password</label>
            <div class="col-sm-6">
              <input type="password" class="form-control" placeholder="Password" name="password" value="<?php if(isset($_COOKIE["rememberpassword"])){ echo $_COOKIE["rememberpassword"]; }?>" required >
            </div>
            </div>
           
            <div class="col-sm-1 col-offset-2">
             <input type="checkbox" class="checkbox-inline" name="remember"  value="1" <?php if(isset($_COOKIE["rememberpassword"])){ echo "checked"; } ?> > </div>
             <div class="col-sm-2"><a href="#">Forgot Password</a></div>
            <div class="col-sm-4">
            <input type="submit" class="btn-success btn-lg" value="Login" style="height: 45px;
width: 100px;"  >
            </div>
          
       </form>
       </div>
    </div>
    <?php
}
else
{
	?>


  
<?php
include('addminmenu.php');
}
?>
	




    
  

     

  </body>
  <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
  <script src="js/bootstrap.js"></script>  
         
</html>
